function init(){
	$("#signupForm").validate({
		submitHandler:function(form){
            save();
        }
	})
	var userid = $("#userId").val();
	if(userid && userid != ""){
		$.ajax({
			type : "GET",
			headers:PRIVATE_HEADERS,
			url : API_SERVER_URL + 'sys/user/getById/'+userid,
			async : false,
			error : function(request) {
				parent.layer.alert("Connection error");
			},
			success : function(data) {
				$("#userName").val(data.name);
			}
		});
	}
}

function save() {
	$.ajax({
		cache : true,
		type : "POST",
		headers:PRIVATE_HEADERS,
		url : API_SERVER_URL + "oa/notify/save",
		data : $('#signupForm').serialize(),// 你的formid
		async : false,
		error : function(request) {
			parent.layer.alert("Connection error");
		},
		success : function(data) {
			if (data.code == 0) {
				parent.layer.alert("消息发送成功。");
				var index = parent.layer.getFrameIndex(window.name);  
				parent.layer.close(index);
			} else {
				parent.layer.alert(data.msg)
			}

		}
	});
}